<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!-- 给标签赋值 th:text -->
<h1 th:text="${userName}"></h1>

<!--给属性赋值-->
<input th:value="${userName}" th:href="${href}">

<!--字符串拼接-->
<span th:text="|欢迎光临:${userName}|"></span>

</body>
</html>